import java.util.ArrayList;

public class 找素数 {
    //素数是只能被1和本身整除的数
    static ArrayList<Integer> getSuNum(int startNum, int endNum) {
        ArrayList<Integer> SuNums = new ArrayList<>();
        for (; startNum <= endNum; startNum++) {
            for (int i = 2; i <= startNum; i++) {
                if (startNum % i == 0 && startNum != i) {//不是自己%自己且余数为0
                    break;
                }
            }

        }
        return SuNums;
    }

    public static void main(String[] args) {
        System.out.println(getSuNum(100, 200));
    }
}
